package itbour.onetouchshow.adapter;

import android.content.Context;

import itbour.onetouchshow.R;
import itbour.onetouchshow.adapter.base.BaseAdapterHelper;
import itbour.onetouchshow.adapter.base.normal.QuickAdapter;
import itbour.onetouchshow.bean.XiuMiRecordBean;

/**
 * Created by guoh on 2018/3/27.
 * 功能描述：
 * 需要的参数：
 */

public class XiuMiRecordAdapter extends QuickAdapter<XiuMiRecordBean> {
    public XiuMiRecordAdapter(Context context) {
        super(context, R.layout.item_xiumi_record);
    }

    @Override
    protected void convert(BaseAdapterHelper helper, XiuMiRecordBean item, int position) {
        if (item == null) return;
        helper.setText(R.id.tv_used_for, item.getName());
        helper.setText(R.id.tv_time, item.getTime());
        helper.setText(R.id.tv_coast, (item.getType() == 1 ? "+" : "-") + (item.getPoints() / 100));
    }
}
